WithCustomPerms

annotation class WithCustomPerms(val perms: Array<String>, val fallback: Int = -1)

Paired with AdminAccess Applies custom permission restrictions to a config setting. Overridden by ClientModifiable

If this annotation is used in a Config, it should also have AdminAccess defined for the config class

Uses permissions from LuckPerms, or any permissions mod that integrates with fabric-permissions-api.

Order of precedence:

  1. NonSync

  2. ClientModifiable (Annotating config class itself)

  3. ClientModifiable (specific setting annotation)

  4. WithCustomPerms (specific setting annotation)

  5. WithPerms (specific setting annotation)

  6. WithCustomPerms (Annotating config class itself)

  7. WithPerms (Annotating config class itself)

  8. Config.defaultPermLevel

Author

fzzyhmstrs

Since

0.3.8

Parameters

perms

Array - permission groups allowed to access this setting. Groups need to be compatible with LuckPerms or similar.

fallback

Int - Default -1 = no custom fallback behavior; it will use the default permissions of the class. If provided, uses vanilla logic: 1 = moderator, 2 = gamemaster, 3 = admin, 4 = owner

Properties

Link copied to clipboard
Link copied to clipboard